package com.twu.biblioteca;

import java.util.Scanner;

public class AppUserIO implements UserIO {
    private Scanner scanner;

    public AppUserIO() {
        scanner = new Scanner(System.in);
    }

    @Override
    public String readLine() {
        return scanner.nextLine().trim();
    }

    @Override
    public void println(String output) {
        System.out.println(output);
    }

    @Override
    public void print(String output) {
        System.out.print(output);
    }

    @Override
    public String readPassword() {
        return new String(System.console().readPassword());
    }
}
